﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Mall.MCScriptManageServices
{
    public partial class AddClassInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //"ClassName", "ParentId", "Depth", "RootId", "OrderId", "Readme", "Child", "Intro"
            string _ClassName = Request["ClassName"] == null ? "" : Request.Form["ClassName"];
            string _ParentId = Request["ParentId"] == null ? "0" : Request.Form["ParentId"];
            string _Intro = Request["Intro"] == null ? "" : Request.Form["Intro"];
            MODEL.MClassInfo modelclass = new MODEL.MClassInfo();
            BLL.Models.MClassModels mss = new BLL.Models.MClassModels();
            modelclass.ClassName = _ClassName;
            modelclass.ParentId = Convert.ToInt32(_ParentId);
            modelclass.Intro = _Intro;
            bool ret = mss.AddClassinfo(modelclass);
            string jsons = string.Empty;
            if (ret)
            {

                jsons = "{success:'true'}";

            }
            else
            {

                jsons = "{success:'false'}";
            }
            Response.Write(jsons);
        }
    }
}